<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>查看新闻表</title>
    <link rel="stylesheet" href="/lib/layui/css/layui.css" media="all">
    <link href="/lib/font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet"/>
    <link href="/lib/winui/css/winui.css" rel="stylesheet"/>
    <style type="text/css">
        .layui-input-block {
            margin-left: 110px;
            min-height: 36px;
            padding-right: 15px;
        }
    </style>
</head>

<body>
<div style="margin-top: 20px;">

</div>
<form class="layui-form" action="/newsController/update">

    <input id="newsId" name="newsId"
           class="layui-input"
           type="hidden" value="${news.newsId!}">

    <div class="layui-form-item">
        <label class="layui-form-label">所在栏目</label>
        <div class="layui-input-block">
            <select id="category" lay-vertype="tips" lay-verify="categoryPid"
                    name="category.categoryId" lay-search>
                <option value=""></option>
            <#list categories as cate>
                <option value="${cate.categoryId!}"  <#if cate.categoryId==news.category.categoryId! >selected</#if> >${cate.categoryName!}</option>

            </#list>

            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">新闻标题</label>
        <div class="layui-input-block">
            <input id="newsTitle" lay-verify="newsTitle" lay-vertype="tips"
                   name="newsTitle"
                   class="layui-input"
                   type="text" value="${news.newsTitle!}">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">标题图片</label>
        <div class="layui-input-block">
            <input id="newsPic" lay-verify="newsPic" lay-vertype="tips"
                   name="newsPic"
                   class="layui-input layui-hide"
                   type="text" value="${news.newsPic!}">
            <div class="layui-upload">
            <#--<button type="button" class="layui-btn" id="accPhoto">更新图片</button>-->
                <div class="layui-upload-list" style="padding-left: 0px;">
                    <img class="layui-upload-img" id="accPhotoimg" width="109" height="112" src="${news.newsPic!}">
                    <p id="accPhoto"></p>
                </div>
            </div>
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">新闻内容</label>
        <div class="layui-input-block">
        ${news.newsContent!}
             <#--<textarea  id="newsContent" lay-vertype="tips" lay-verify="newsContent"-->
                        <#--placeholder="请输入内容" name="newsContent" class="layui-textarea">${news.newsContent!}</textarea>-->
            <#--<input id="newsContent" lay-verify="newsContent" lay-vertype="tips"-->
                   <#--name="newsContent"-->
                   <#--class="layui-input"-->
                   <#--type="text" value="${news.newsContent!}">-->
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">浏览次数</label>
        <div class="layui-input-block">
            <input id="newsReadingnumber" lay-verify="newsReadingnumber" lay-vertype="tips"
                   name="newsReadingnumber"
                   class="layui-input"
                   type="text" value="${news.newsReadingnumber!}">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">评论条数</label>
        <div class="layui-input-block">
            <input id="newsCommentcount" lay-verify="newsCommentcount" lay-vertype="tips"
                   name="newsCommentcount"
                   class="layui-input"
                   type="text" value="${news.newsCommentcount!}">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">发布用户</label>
        <div class="layui-input-block">
            <input id="userId" lay-verify="userId" lay-vertype="tips"
                   name="userId"
                   class="layui-input"
                   type="text" value="${news.userId}">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">发布时间</label>
        <div class="layui-input-block">
            <input id="newsPublishtime" lay-vertype="tips" required
                   lay-verify="required" name="newsPublishtime"
                   class="layui-input"
                   type="text" type="text" lay-vertype="tips" required
                   lay-verify="required" lay-verify="date" placeholder="yyyy-MM-dd"
                   value="${(news.newsPublishtime!)?string('yyyy-MM-dd HH:mm:ss')}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">更新时间</label>
        <div class="layui-input-block">
            <input id="updateTime" lay-vertype="tips" required
                   lay-verify="required" name="updateTime"
                   class="layui-input"
                   type="text" type="text" lay-vertype="tips" required
                   lay-verify="required" lay-verify="date" placeholder="yyyy-MM-dd"
                   value="${(news.updateTime!)?string('yyyy-MM-dd HH:mm:ss')}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">显示顺序</label>
        <div class="layui-input-block">
            <input id="newsSort" lay-verify="newsSort" lay-vertype="tips"
                   name="newsSort"
                   class="layui-input"
                   type="text" value="${news.newsSort!}">
        </div>
    </div>


</form>

<script src="/lib/layui/layui.js"></script>
<script src="/js/news/edit.js"></script>
</body>

</html>
